package com.gears_software.sxdc.dccx.data.finder;


import android.support.v4.media.MediaBrowserServiceCompat;

import com.gears_software.sxdc.dccx.data.finder.util.GearsAuthInterceptor;
import com.gears_software.sxdc.dccx.data.model.BindBankCard;
import com.gears_software.sxdc.dccx.data.model.GetCashrule;
import com.gears_software.sxdc.dccx.data.model.ResultModel;
import com.gears_software.sxdc.dccx.data.model.BankCardType;
import com.gears_software.sxdc.dccx.data.model.TransactionRecord;
import com.gears_software.sxdc.dccx.data.model.UserBalance;
import com.gears_software.sxdc.dccx.data.model.request.RBalanceTrading;
import com.gears_software.sxdc.dccx.data.model.request.RBindBankCard;
import com.gears_software.sxdc.dccx.data.model.RechargeAmount;
import com.gears_software.sxdc.dccx.data.model.UserBankCardInformation;
import com.gears_software.sxdc.dccx.data.model.request.RCashModel;
import com.gears_software.sxdc.dccx.data.model.request.RChargeModel;
import com.gears_software.sxdc.dccx.data.model.request.RChongZhiChargeModel;

import org.androidannotations.rest.spring.annotations.Body;
import org.androidannotations.rest.spring.annotations.Get;
import org.androidannotations.rest.spring.annotations.Path;
import org.androidannotations.rest.spring.annotations.Post;
import org.androidannotations.rest.spring.annotations.Put;
import org.androidannotations.rest.spring.annotations.Rest;
import org.androidannotations.rest.spring.annotations.RestService;
import org.androidannotations.rest.spring.api.RestClientErrorHandling;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;

import java.util.List;

/**
 * Created by SunMuran on 2017/8/12.
 * 银行相关接口
 */
@Rest(rootUrl = RequestUrl.ROOT, converters = {MappingJackson2HttpMessageConverter.class}, interceptors = GearsAuthInterceptor.class)
public interface IBankFinder extends RestClientErrorHandling {
    /**
     * 获取用户余额
     */
    @Get("/api/pay/balance")
    ResultModel<UserBalance> getUserBalance();

    /**
     * 充值金额
     */
    @Get("/api/pay/list")
    ResultModel<List<RechargeAmount>> rechargeAmount();

    /**
     * 获取银行卡类型列表
     */
    @Get("/api/bank/list")
    ResultModel<List<BankCardType>> getBankCardType();

    /**
     * 获取用户银行卡信息
     */
    @Get("/api/bank/get")
    ResultModel<UserBankCardInformation> getUserBankCardInformation();

    /**
     * 用户绑定银行卡
     */
    @Post("/api/bank/bind")
    ResultModel<BindBankCard> bindBandCard(@Body RBindBankCard card);

    /**
     * 用户修改银行卡
     */
    @Put("/api/bank/update")
    ResultModel<String> updateBankCard(@Body RBindBankCard card);

    /**
     * 删除银行卡
     */
    @Get("/api/bank/delete")
    ResultModel<String> deleteBankCard();

    /**
     * 用户交易流水
     */
    @Get("/api/bank/user_transaction")
    ResultModel<List<TransactionRecord>> getTransaction();

    /**
     * 查询司机提现日期规则（专车拼车）
     *
     * @param type
     * @return
     */
    @Get("/api/bank/get_cashrule?type={type}")
    ResultModel<GetCashrule> getCashrule(@Path String type);

    //充值
    @Post("/api/pay/recharge")
    ResultModel<String> getChongZhiCharge(@Body RChongZhiChargeModel chongZhiChargeModel);

    //获取charge
    @Post("/api/pay/recharge_trading")
    ResultModel<String> getCharge(@Body RChargeModel chargeModel);

    //余额支付
    @Post("/api/pay/balancetrading")
    ResultModel<String> balanceTrading(@Body RBalanceTrading balanceTrading);

    //提现
    @Post("/api/pay/cash")
    ResultModel<String> getCash(@Body RCashModel cashModel);
}